<%@  language="VBSCRIPT" codepage="65001" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/hinhmaunguoidung.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Cập nhật điểm còn lại của sản phẩm</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
</head>
<body>
    <!--#include file=connection.inc-->
    <% 
	            	MaDoanhNghiep=Session("ma_dn")
    %>
    <%
					CountTB=Cint(Request.Form("CountTB")) 
					if Cint(Request.Form("CountTB")) =1 	then
					 CountTB=Cint(Request.Form("CountTB")) 
					 else
					 CountTB=Cint(Request.Form("CountTB"))-1
					end if
					i=1
					while i <= Cint(Request.Form("CountTB"))  
						MaThietBi=Request.Form("MaThietBi"&i)
						T=Request.Form("T"&i)
						H=Request.Form("H"&i)						
						N=Request.Form("N"&i)	
						C=Request.Form("C"&i)
						k=Request.Form("k"&i)
						Kt=Request.Form("Kt"&i)
						Kh=Request.Form("Kh"&i)
						Kn=Request.Form("Kn"&i)
						Kc=Request.Form("Kc"&i)
 		             
						Sql="Update ThietBi Set T='" & T & "',H='" & H & "',N='" & N & "',C='" & C & "',k='" & k & "',Kt='" & Kt & "',Kh='" & Kh & "',Kn='" & Kn & "',Kc='" & Kc & "' where MaThietBi='" & MaThietBi & "' and MaDoanhNghiep='" & MaDoanhNghiep & "'"
						 
					   Response.Write(Sql)
						
						 
						conn.execute Sql
						i=i+1
					wend 
					
				  	Response.Write("Bạn đã nhập điểm thành công")
					
					Response.Redirect("PhieuDiemNhapGiaTriConLaiCuaThietBi.asp")
				  
				  
    %>
</body>
<!-- InstanceEnd -->
</html>
